<?php

class CuadroMandoSistemasController extends Sgit_Controller_Action
{
    
    protected $_main_model = 'LecturasSistemas';

    
    
    function _begin()
    {
        
        $f_lectura=$this->_getParam('f_lectura');
        if($f_lectura){
            $this->f_lectura=$f_lectura;
        }else{
            $ultima_lectura=$this->_model->default->getUltimasLecturas(1);
            $lecturas = array_keys($ultima_lectura);
            $this->setParam('f_lectura',$lecturas[0]);
            $this->f_lectura=$lecturas[0];
        }
  
        $this->_loadModel('LecturasSistemasValidar');
    }
    


    public function indexAction()
    {
        $filtros = new Sgit_Form_Filtros();
        $f_semanas = new Sgit_Form_Element_Select_LecturasSistemas('f_lectura');
        $f_semanas->setAttrib('onChange','submit()');
        $filtros->addFormSelect($f_semanas);
        $values = $this->_getFiltrosValues($filtros);
        $filtros->myRender();

        $this->_model->LecturasSistemasValidar->isValidate($this->f_lectura);

    }
    
    
 


}

